package com.ourteam.education.domain;
/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Nov 30 16:49:33 CST 2018
 * Auto Generate Date : 2019-09-22 15:15:22
  * Warning ! This file will be overwrite when regenerate !
  * 
 */

import java.util.Map;
import java.util.HashMap;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.beanutils.BeanMap;
import net.dao.IDataPopulateCallback;


public class StudentBean implements java.io.Serializable {

        
	private static Map<String,String> mappedDaoFields = new HashMap<String,String>();
    
	private com.ourteam.education.dao.Student student;

	protected BeanMap getBeanMap(){
	
		return new BeanMap(student);
	}
	
	static{
				
												
		mappedDaoFields.put("id",com.ourteam.education.dao.IStudentDAO.Id);
		
																																										
				
																
		mappedDaoFields.put("studentName",com.ourteam.education.dao.IStudentDAO.StudentName);
		
																																						
				
																				
		mappedDaoFields.put("studentGender",com.ourteam.education.dao.IStudentDAO.StudentGender);
		
																																		
				
																								
		mappedDaoFields.put("contactsPhone",com.ourteam.education.dao.IStudentDAO.ContactsPhone);
		
																														
				
																												
		mappedDaoFields.put("contactsRelation",com.ourteam.education.dao.IStudentDAO.ContactsRelation);
		
																										
				
																																
		mappedDaoFields.put("status",com.ourteam.education.dao.IStudentDAO.Status);
		
																						
				
																																				
		mappedDaoFields.put("remarks",com.ourteam.education.dao.IStudentDAO.Remarks);
		
																		
				
																																								
		mappedDaoFields.put("studentBirthday",com.ourteam.education.dao.IStudentDAO.StudentBirthday);
		
														
				
																																												
		mappedDaoFields.put("contactsName",com.ourteam.education.dao.IStudentDAO.ContactsName);
		
										
				
				
	}
	
	public static String getMappedDAOField(String aAttrName){
		return mappedDaoFields.get(aAttrName);
	}
	
	
	public StudentBean() {
		super();
	    		
		this.student = new com.ourteam.education.dao.Student();
                
	}
	
		
	public StudentBean(com.ourteam.education.dao.Student student) {
		super();
	
		this.student = student;
		
	}
		
		
		
    	
	public com.ourteam.education.dao.Student convertToStudent(){
		return this.student;
	}
	
	public com.ourteam.education.dao.Student convertTo(){
		return this.student;
	}
	
			
		
			
			
		
	/**
	 * Get id
	 * 
	 * @return long
	 */
	public long getId(){
		return (long) this.student.getId();
	}
	
	/**
	 * Set id
	 * 
	 * @parameter long
	 */
	public void setId(long id){
		
		this.student.setId(id);
	}
		
																					
		
		
					
			
		
	/**
	 * Get studentName
	 * 
	 * @return String
	 */
	public String getStudentName(){
		return (String) this.student.getStudentName();
	}
	
	/**
	 * Set studentName
	 * 
	 * @parameter String
	 */
	public void setStudentName(String studentName){
		
		this.student.setStudentName(studentName);
	}
		
																			
		
		
							
			
		
	/**
	 * Get studentGender
	 * 
	 * @return String
	 */
	public String getStudentGender(){
		return (String) this.student.getStudentGender();
	}
	
	/**
	 * Set studentGender
	 * 
	 * @parameter String
	 */
	public void setStudentGender(String studentGender){
		
		this.student.setStudentGender(studentGender);
	}
		
																	
		
		
									
			
		
	/**
	 * Get contactsPhone
	 * 
	 * @return String
	 */
	public String getContactsPhone(){
		return (String) this.student.getContactsPhone();
	}
	
	/**
	 * Set contactsPhone
	 * 
	 * @parameter String
	 */
	public void setContactsPhone(String contactsPhone){
		
		this.student.setContactsPhone(contactsPhone);
	}
		
															
		
		
											
			
		
	/**
	 * Get contactsRelation
	 * 
	 * @return String
	 */
	public String getContactsRelation(){
		return (String) this.student.getContactsRelation();
	}
	
	/**
	 * Set contactsRelation
	 * 
	 * @parameter String
	 */
	public void setContactsRelation(String contactsRelation){
		
		this.student.setContactsRelation(contactsRelation);
	}
		
													
		
		
													
			
		
	/**
	 * Get status
	 * 
	 * @return String
	 */
	public String getStatus(){
		return (String) this.student.getStatus();
	}
	
	/**
	 * Set status
	 * 
	 * @parameter String
	 */
	public void setStatus(String status){
		
		this.student.setStatus(status);
	}
		
											
		
		
															
			
		
	/**
	 * Get remarks
	 * 
	 * @return String
	 */
	public String getRemarks(){
		return (String) this.student.getRemarks();
	}
	
	/**
	 * Set remarks
	 * 
	 * @parameter String
	 */
	public void setRemarks(String remarks){
		
		this.student.setRemarks(remarks);
	}
		
									
		
		
																	
			
		
	/**
	 * Get studentBirthday
	 * 
	 * @return java.util.Date
	 */
	public java.util.Date getStudentBirthday(){
		return (java.util.Date) this.student.getStudentBirthday();
	}
	
	/**
	 * Set studentBirthday
	 * 
	 * @parameter java.util.Date
	 */
	public void setStudentBirthday(java.util.Date studentBirthday){
		
		this.student.setStudentBirthday(studentBirthday);
	}
		
							
		
		
																			
			
		
	/**
	 * Get contactsName
	 * 
	 * @return String
	 */
	public String getContactsName(){
		return (String) this.student.getContactsName();
	}
	
	/**
	 * Set contactsName
	 * 
	 * @parameter String
	 */
	public void setContactsName(String contactsName){
		
		this.student.setContactsName(contactsName);
	}
		
					
		
			
			
			
			
			
			
			
			
			
			
			
	
	public int hashCode() {
   		return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
 	}
	
		
	public boolean equals(Object obj) {
		if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof StudentBean) == false) {
            return false;
        } // end if

        StudentBean other = (StudentBean) obj;
        
        boolean isEqual = false;
        
                
        com.ourteam.education.dao.Student tempStudent = other.convertToStudent();
        
        if(tempStudent == null || this.student == null){
        	isEqual = false;
        }
        else if(tempStudent == this.student || tempStudent.equals(this.student) ){
        	isEqual = true;
        }
        else{
        	isEqual = false;
        }
        
        return isEqual;
	}
	
	
	public static StudentBean[] toArray(com.ourteam.education.dao.Student[] aStudents){
		
		return toArray(aStudents,null);
	}
	
	public static StudentBean[] toArray(com.ourteam.education.dao.Student[] aStudents , IDataPopulateCallback aCallBack){
		 
		 if(ArrayUtils.isEmpty(aStudents)){
		 	return new StudentBean[0];
		 }
		 
		 int length = aStudents.length;
		 
		 StudentBean[] beans = new StudentBean[length];
		  
		 for (int i = 0; i < length; i++) {
			beans[i] = new StudentBean(aStudents[i]);
			if(aCallBack != null){
			    aCallBack.populate(beans[i],new Object[]{aStudents[i]});
			}
		 }
		 
		 return beans;
	 }
	 
	 	 
}